// 引入接口模块
import request from '@/utils/request'

// 按条件查询角色
export const getRolePages = (data = {}) => {
  return request({
    method: 'post',
    url: '/boss/role/getRolePages',
    data
  })
}

// 删除角色
export const deleteRole = id => {
  return request({
    method: 'delete',
    url: `/boss/role/${id}`
  })
}

// 更新或保存角色
export const saveOrUpdate = data => {
  return request({
    method: 'post',
    url: '/boss/role/saveOrUpdate',
    data
  })
}

// 获取角色信息
export const getRole = id => {
  return request({
    method: 'get',
    url: `/boss/role/${id}`
  })
}
